package com.kun.hosp.repository;

import com.kun.model.entity.hosp.Department;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

/**
 * @Author zhoukun
 * @Date 2021/5/3 12:05
 * 科室
 */
@Repository
public interface DepartmentRepository extends MongoRepository<Department,String> {
    /**
     * 根据科室code查询科室
     * @param depcode
     * @return
     */
    Department findDepartmentByDepcode(String depcode);

    /**
     * 删除
     */
    void deleteDepartmentByDepcode(String depcode);
    /**
     * 根据科室code和医院code查询科室名称
     * @param depcode
     * @return
     */
    Department findDepartmentByHoscodeAndDepcode(String hoscode,String depcode);
}
